﻿using System.Collections.Generic;
using Iot.AlarmDispose.Database.Entities;

namespace Iot.AlarmDispose;

/// <summary>
///     实时告警展示接口
/// </summary>
public interface IReadRealTimeAlertList<TAlertClassify, out TAlertsHistory> : IEnumerable<TAlertsHistory>
    where TAlertClassify : class, IAlertClassify
    where TAlertsHistory : class, IAlertsHistory<TAlertClassify>;

/// <summary>
///     实时显示报警列表
/// </summary>
/// <typeparam name="TAlertClassify"></typeparam>
/// <typeparam name="TAlertsHistory"></typeparam>
public interface
    IRealTimeAlertList<TAlertClassify, TAlertsHistory> : IReadRealTimeAlertList<TAlertClassify, TAlertsHistory>
    where TAlertClassify : class, IAlertClassify
    where TAlertsHistory : class, IAlertsHistory<TAlertClassify>
{
    /// <summary>
    ///     添加一个项
    /// </summary>
    /// <param name="item">添加对象</param>
    void AddAlarm(TAlertsHistory item);

    /// <summary>
    ///     删除特定对象。
    /// </summary>
    /// <param name="item">删除的对象</param>
    /// <returns></returns>
    void RemoveAlarm(TAlertsHistory item);
}